#ifndef _memmgr_2_h
#define _memmgr_2_h


#define NEWN(n,size) 				memory_new((n)*(size),__FILE__,__FUNCTION__,__LINE__)
#define NEW(size)    				NEWN(1,size)
#define NEWNP(n,ptr) 				NEWN( ( n ) , sizeof *( ptr ) )
#define NEWP(ptr)	 				NEWNP(1, ( ptr ) )
#define RESIZE(ptr,size) 			memory_resize(ptr,size,__FILE__,__FUNCTION__,__LINE__)
#define FREE(ptr)	 				memory_free(ptr,__FILE__,__FUNCTION__,__LINE__)

#define Check_Memory_Status(ptr) 	memory_status_string(ptr)
#define Check_Memory_Leaking()		memory_leaking_check();


extern void * memory_new ( int size ,
	const char *file , const char *func , const int line);
	
extern int   memory_free( void * ptr ,
	const char *file , const char *func , const int line);
	
extern void *memory_resize(void *ptr , int size_data ,
	const char *file , const char *func , const int line);
	
extern const char *	memory_status_string(void *ptr);
extern void 		memory_leaking_check(void);

#endif
